/*! \file Buffer.inl
 *	\brief 
 *
 *	created:	2010/12/12
 *	created:	12:12:2010   20:32
 *	filename: 	C:\src\tactics-engine\libs\gd\Buffer.inl
 *	file path:	C:\src\tactics-engine\libs\gd
 *	file base:	Buffer
 *	file ext:	inl
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

namespace tt{
namespace gd{

inline
Buffer::Buffer(ScopedPtr<BufferImpl>& impl)
: m_impl()
{
	m_impl.swap(impl);
}

inline
Buffer::~Buffer()
{

}

inline
void Buffer::lock( DeviceContext* deviceContext )
{
	m_impl->lock(deviceContext);
}

inline
void Buffer::unlock( DeviceContext* deviceContext )
{
	m_impl->unlock(deviceContext);
}

inline
UInt Buffer::size() const
{
	return m_impl->size();
}

inline
void* Buffer::data()
{
	return m_impl->data();
}

inline
void Buffer::apply( DeviceContext* deviceContext )
{
	m_impl->apply(deviceContext);
}

} //namespace gd
} //namespace tt